When processing logs in a sawmill, it is desirable to maximize the volume of the sawn lumber that can be obtained from any one log. It has been found useful to map the shape of raw wood and in particular logs or lumber, and process such information by means of optimizing algorithms so that the wood or the saw may be positioned to maximize the volume of boards cut.
In order to map the surface profile of a log or cant, remote sensors have been employed such as those taught in U.S. Pat. No. 5,056,922 which issued Oct. 15, 1991 to Cielo et al for a Method and Apparatus for Monitoring the Surface Profile of a Moving Work Piece. Cielo et al teaches an apparatus for three-dimensional surface profiling based on triangulation. Triangulation consists of projecting a beam of light to form a luminous spot on the surface to be profiled. It is the location of the luminous spot whose position is to be measured. Viewing the projected spot from an angle relative to the light beam, and determining the position of the reflected spot image allows the instantaneous distance to the surface of the log or cant to be gauged.
Cielo et al discloses a light projecting system which projects more than one discreet co-planar light beam onto the reflecting surface to be profiled, each light beam at a different angle of instance. An optical means such as a lens gathers the light beams reflected from the surface being profiled (hereinafter the "target surface") and images those reflected beams onto a means for detecting each of the light beams such as an array of photo-sensitive pixels. The photo-sensitive pixels, when struck by a light beam, generate an electrical signal. In the array, the location of the pixels generating such signals, relative to the light source, are indicative of distance to the target surface because of the triangulation geometry between the light source and the imaged spot on the array.
Cielo et al teaches using a line array photo-detector aligned relative to an objective lens so that the projection of their axes intersects at a point on the target surface, that is, the object plane, thus satisfying the so-called Scheimpflug condition for focusing a lens. Cielo et al describes this as ensuring that all of the projected light beam spots along the target surface are imaged on the line array detector in sharp focus. The one-dimensional line array detector has detecting elements, that is, pixels, disposed along the detector in a one-dimensional array. The pixels are elongated in a direction perpendicular to the longitudinal axis of the array. Cielo et al teaches using a wide aperture array, that is, an array having significantly elongated pixels (2.5 mm.times.15 .mu.m with 25 .mu.m spacing) in the line array detector so that the light beam spots, preferably having elliptically shaped cross sections, are imaged within the aperture of the array.
Cielo et al also teaches that the signal amplitude generated by a light spot hitting adjacent pixels in the photo-detector array, if plotted as signal amplitude versus position along the array, is a pulse having a gaussian distribution. Cielo et al further teaches that the position on the array of each light beam spot image must be located very precisely in order to obtain a good depth accuracy, that is, an accurate distance measurement from the sensor to the target surface whose profile is being mapped. In particular, Cielo et al teaches locating the centre of each pulse using an algorithm for determining what he refers to as the centre of gravity of the pulse. The centroid algorithm is as follows: EQU .mu.avg=.SIGMA..sub.i .mu..sub.i I(.mu..sub.i)!/.SIGMA..sub.i I(.mu..sub.i)!
where .mu..sub.i is the position of the i-th element along the array detector and I(.mu..sub.i) is the amplitude of the signal detected by this element, while .SIGMA. is a summation symbol. The centre of gravity computed according to this formula corresponds to the point of maximum signal amplitude of the pulse if the pulse is in fact gaussian, that is, smooth and symmetrical.
Cielo et al recognize however that the shape of such pulses may vary considerably because of speckle and thus a centroid approximation algorithm will not necessarily accurately estimate the position on the array of the maximum signal amplitude of the pulse. Accurately estimating the position of the pulse centroid allows for accurate mapping of the target surface. Cielo et al obtain what they describe as a smooth and constant pulse shape by their combination of a wide aperture array with an elliptically shaped light beam spot imaged as a focussed spot on the array. This allows averaging of the random fluctuations of a number of speckles within each pixel comprising the laser spot image.
The draw back of such a system is that a wide aperture array is required and the alignment of the light beams must be sufficiently accurate to place the imaged light beam spot fully onto the array in order that the stimulated pixels generate sufficient output signal strength to overcome the increased detector background noise associated with wide aperture arrays. Wide aperture arrays are also typically more costly and are slower to scan than conventional one-dimensional arrays having significantly smaller apertures.
Nosier, U.S. Pat. No. 4,248,532 which issued Feb. 3, 1981 for an Electro-optical Distance Measuring System also teaches that it is desirable that the light beam imaged spot on the array be in focus. Nosler discloses a triangulation based electro-optical sensor, similar in underlying principal to that taught by Cielo et al, to measure the position of, and thereby to map, the profile of the surface of logs being moved past the electro-optical distance measuring device. A laser beam is projected onto a log surface and the image of the beam reflection imaged by a lens onto a linear photo-detector array. The location of the image on the array is indicative of the distance to the log surface.
It is disclosed by Nosler that measuring logs requires a dynamic measurement range of between 8 inches and 48 inches and that it is desired to maximize the resolution accuracy of the reflected image so that such accuracy does not vary over the entire dynamic range. Nosier teaches that the angular positioning of the photo-detector array is critical to ensuring that throughout the dynamic range the reflected image on the array will always be in sharp focus. Nosier states that changes in focus of the image on the detector array will cause significant resolution accuracy differences.
In order that the reflected image on the array always be in sharp focus, Nosler teaches intersecting the axis of the light beam (which coincides in the Nosler device with the object plane of the device) with the interception point of the principal axis of the lens and the longitudinal axis of the photo-detector array so that all three axes intersect at one point, referred to by Nosler as the "known point". Intersection of all three axes at the known point also satisfies, as does impliedly the Cielo device (see FIG. 2), the Scheimpflug condition for focusing images of a reflected light beam onto a surface such as that of the photo-detector array. For a description of the Scheimpflug condition see for example: Scheimpflug, T(1906), `Der Photoperspektograph und seine Anwendung`, Photographische Korrespondenz 43, 516; Brown, N(1969), `Slit Image Photography`, Trans. Ophthal. Soc., 89, 397; G. Bickel, G. Hausler, and M. Maul, "Triangulation with expanded range of depth", Opt. Eng. 24(6), 975-977(1985).
The Scheimpflug condition is an approximation based on the assumption that the lens being used to focus the reflected image onto the photo-detector array surface may be modelled as a thin lens. That is, an assumption is made that the thickness of the lens element is small enough so that the effect of the lens thickness on the accuracy of the calculation of the known point may be neglected. For the purpose of such a thin lens approximation, the thickness of the lens is assumed to be zero. The principal points of the lens are thus assumed to be coincident. The principle plane of a thin lens is the plane which is normal to the optical axis of the lens and intersects the principal point which is on this same axis. The position of this plane at which it, the light beam axis and the longitudinal axis of the array intersect at a known point defines an orientation which satisfies the Scheimpflug condition. If it is assumed then, using the thin lens approximation, that the primary and secondary principal plane of the lens may be taken as coincident then that coincident plane or a chosen single reference plane, where it intersects the light beam axis and the longitudinal axis of the array locates the known point and satisfies the Scheimpflug condition.
Real lenses such as used in the present invention and such as are used in triangulation based electro-optical distance measuring devices of which the applicant is aware, have finite thicknesses and thus primary and secondary principal points, separated by known distances. For the purpose of comparing the characteristics of a real or thick lens with respect to the Scheimpflug condition, the terms primary and secondary planes have been used to define planes which are normal to the optical axis and intersect the primary and secondary principal points, respectively If the geometry of such a device is aligned to form a known point and thus satisfy the Scheimpflug condition, for example, by having the secondary principal plane intersect the point of intersection of the light beam axis with the longitudinal axis of the detector array, then it is only an approximation to state, as does Nosler, that focus is maintained over what Nosler refers to as the dynamic range. Such an approximation ignores the higher order effects of a real lens.
The reliance by Cielo et al and Nosier on the concept of focus is an oversimplification. That is, it is not only the focus achieved by a geometric alignment satisfying the Scheimpflug condition, in applications of which the present invention is one, that govern the resolution accuracy of a photodetection array in a triangulation based distance measuring device. Instead of "focus" per se, it is array output signal optimization which is desirable in devices using real lenses and conventional non-wide aperture photo-detector arrays such as the EG&G Reticon.TM. array, model number RL 1024DAG-020. Array output signal optimization means optimizing the signal to noise ratio from the array and optimizing the array resolution accuracy, i.e. the accuracy with which the centroid of a pulse may be located.
Concentrating solely on focus by strictly adhering to the Scheimpflug condition ignores other factors affecting array output signal optimization, vis:
(a) light beam intensity profile; PA1 (b) saturation of pixel output; PA1 (c) number of pixels covered by the light beam image; PA1 (d) standoff distance; PA1 (e) target range; and, PA1 (f) laser power setting. PA1 (a) defocusing the major optical elements to a near-Scheimpflug condition to achieve optimization according to the present invention; and PA1 (b) the specific manner of defocusing (i.e. defocusing the lens by moving the lens along the optical axis) to achieve specific optimized characteristics according to specific criteria. PA1 1. approximate as closely as possible to a Gaussian distribution the intensity profile of the image impinging the pixel array; PA1 2. maximize the amplitude of the intensity profile of the output signal of the array; PA1 3. minimize the saturation of the pixels in the array; and PA1 4. optimize the width of the image, normally within a range of the number of pixels between 10 and 35. With reference to criteria #1, Suzuki makes no references to a Gaussian distribution. Referring to criteria #2, Suzuki makes no mention of maximizing the image amplitude so as to utilize the full dynamic range of the detector elements. In fact, referring to FIG. 3, Suzuki provides examples of 2 acceptable signals labelled 13 and 14 where signal 14 has a peak amplitude that is 50% of that signal 13. This shows a lack of understanding of the importance of signal amplitude on sub-pixel resolution. Referring to criteria #3, again Suzuki makes no mention of signal level relative to element saturation level and thus did not recognize the importance of utilizing the full dynamic range of the detector array elements and the contribution of maximizing signal amplitude while minimizing pixel saturation in improving sub-pixel resolution. It is clear that although Suzuki may have been able to improve the sub-pixel resolution over the crude ranging devices in the prior art, his optical alignment criteria lacks the inventive aspects particularly pointed out and distinctly claimed in the present claims. PA1 (a) a laser light source for projecting a light beam along a light beam axis so as to project a light spot onto a surface of a workpiece; PA1 (b) a lens having an optical axis and a depth of focus dependant on the target distance, the lens for gathering reflected light from the light spot on the surface of the workpiece; PA1 (c) a linear photodetector array of adjacent light detecting pixels, the array having a longitudinal array axis, the array for detecting light impinging the pixels and generating an output signal indicative of the position of the pixels being impinged by the light, PA1 (1) approximate as closely as possible to a gaussian distribution the intensity profile of the image impinging the pixel array; PA1 (2) optimize the width of the image, normally within a range of the number of pixels between 10 and 35; PA1 (3) maximize the amplitude of the intensity profile of the output signal of the array; and, PA1 (4) minimize the saturation of the pixels in the array. Advantageously the optimized defocused location is within 20% of the lens' focused location, where such a percentage is defined as the distance between the optimized defocused location and the focused location relative to the depth of focus of the lens at a desired stand-off distance.
In what follows then, the "focus" position or known point refers to an alignment whereby the secondary principal lens plane intersects the intersection point of the light beam axis and the longitudinal axis of the photo-detector array. Alignments other than those satisfying the Scheimpflug condition are referred to as "de-focused". Thus, for example, translating the position of the lens along the lens axis so as to move the secondary principal plane off the known point is referred to as defocusing the lens.
Suzuki U.S. Pat. No. 4,575,237 describes a sub-pixel interpolation methodology for improving the distance measuring resolution of a triangulation based ranging device consisting of a source, collection lens, detector and processing electronics. The Suzuki method improved upon the prior art methods by converting the light level signals of a linear array of light detection elements into relative magnitudes. This resulted in a sampled light intensity distribution signal of the light incident on the array, that could be processed by electronic circuitry. The Suzuki method was based on fitting a curve to this sampled light intensity distribution and calculating the location of the peak of this curve. As a result, it was possible to interpolate between elements to a level greater than the 1/2 element level achieved in the prior art and thus improve the distance measurement of the device.
Since the Suzuki patent was based on detection of the extrema of a fitted curve, Suzuki was required to use at least a second order curve to fit to the data. In order to define a specific curve, the 3 coefficients a, b and c had to be determined. This required 3 x,y coordinates in order to generate the 3 equations necessary to solve for the 3 unknown coefficients. As a result, the method of Suzuki required the relative magnitude of at least 3 elements, in order to determine the coefficients of the quadratic curve and then the x,y coordinate of the peak of this function. As a result, the reference in column 4, lines 21-22 of the Suzuki reference where he mentions the need "to allow light intensity distributions 13 and 14 to have suitable extents of width" refers to the fact that Suzuki required the light level of at least 3 pixels to make a measurement of the peak. This criteria determined "the focus positions and the aberration correcting states of the light beam projecting and light receiving optical systems of the light measuring device". It did not means that the device was to be defocused, just that the point of focus was to be placed so that the beam of light was wide enough at the array to cover 3 pixels. Suzuki at all times assumed the use of a focused device. This is emphasized by Suzuki in the first full paragraph of column 2 of that reference, where defocus is identified as being detrimental, along with other factors associated with getting the reflected light to impinge at least 3 light sensitive elements such as reduction in the light receiving area of each light sensitive element, with its associated decrease in quantity of light. Thus Suzuki points away from defocus being a desirable attribute in a distance measuring device for optimizing output. Rather, defocus is relegated to a necessary evil, once to be avoided, but one which may be necessary to obtain sufficient image width for interpolation according to the Suzuki method.
The 3 element criteria of the Suzuki method is also illustrated in Figure in that both curves 13 and 14 are approximately 3.5 elements wide and would thus yield the coordinates necessary to determine the coefficients of a quadratic function.
The only criteria that Suzuki mentions is "suitable extents of width" which he indicates in the patent disclosure (column 3, line 63 to column 4, line 17 and in FIG. 3) to be 3 array elements.
Applicant notes that the Suzuki patent makes no mention in optimizing the optical configuration of his distance measurement system of:
For example, the lens is defocused so as to optimize the output signal according to the following criteria:
Referring to criteria #4, Suzuki's 3 pixel recommendation differs significantly from the 10 to 35 pixel recommendation outlined in the present application.
It is an object of the present invention consequently to provide a method and apparatus for optimizing the alignment of the three principal components, namely, the light source, the lens, and the photo-detector array, and for optimizing the output signal from the photo-detector array across the target range of interest.